#import <UIKit/UIKit.h>

@class SBApplication;

enum {
    PIActionNone = 0,
    PIActionNext = 1,
    PIActionActive = 2,
    PIActionPlanning = 3,
    PIActionDelegated = 4,
    PIActionWaiting = 5,
    PIActionHold = 6,
    PIActionPostponed = 7,
    PIActionSomeday = 8,
    PIActionCancelled = 9,
    PIActionReference = 10
};

enum {
    PIImportanceNone = 0,
    PIImportanceTop = 1,
    PIImportanceHigh = 5,
    PIImportanceNormal = 10,
    PIImportanceLow = 15
};

enum DateFormatterFormat {
	DateFormatterLongFormat = 0,
	DateFormatterNormalFormat = 1,
	DateFormatterCompressedFormat = 2
};


@interface PIIntegration : NSObject

+(NSString*) base64EncodeString:(NSString*)src;

+(SBApplication*) getApplication;
+(NSString*) getDatabasePath:(NSString*) path;

+(NSDate*) localDateForDate:(double)date;
+(NSDate*) localDateForTime:(double)date;
+(NSString*) formatDate:(NSBundle*)bundle date:(NSNumber*)dateNum time:(BOOL)time format:(DateFormatterFormat)format;
	
+(NSString*) iconFileForAction:(int)action;

+(NSString*) nameForAction:(int)action;
+(NSString*) nameForImportance:(int)importance;

+(UIColor*) topImportanceBGColorForPrefs:(NSDictionary*)prefs;
+(UIColor*) highImportanceBGColorForPrefs:(NSDictionary*)prefs;
+(UIColor*) normalImportanceBGColorForPrefs:(NSDictionary*)prefs;
+(UIColor*) lowImportanceBGColorForPrefs:(NSDictionary*)prefs;
+(UIColor*) overdueBGColorForPrefs:(NSDictionary*)prefs;

@end
